package cn.wolfcode.edu.service.impl;

import cn.wolfcode.edu.domain.TransferHistory;
import cn.wolfcode.edu.mapper.TransferHistoryMapper;
import cn.wolfcode.edu.query.QueryObject;
import cn.wolfcode.edu.service.ITransferHistoryService;
import cn.wolfcode.edu.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TransferHistoryServiceImpl implements ITransferHistoryService {

    @Autowired
    private TransferHistoryMapper transferHistoryMapper;

    public PageResult query(QueryObject qo) {
        //查询数据数
        Integer total = transferHistoryMapper.queryForCount(qo);
        //查询数据集
        List<TransferHistory> rows =  transferHistoryMapper.queryForList(qo);
        return new PageResult(total,rows);
    }
}
